package com.sofwin.service.impl;

import com.sofwin.mapper.SysDeptMapper;
import com.sofwin.pojo.Node;
import com.sofwin.pojo.SysDept;
import com.sofwin.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @packageName: com.sofwin.service.impl
 * @user: andyliu
 * @date: 2022/12/31 11:20
 * @email 115176513@qq.com
 * @description: TODO
 */
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private SysDeptMapper mapper;
    @Override
    public List<SysDept> queryAll() {
        return mapper.selectByExample(null);
    }

    @Override
    public List<Node> queryTreeData() {
        return mapper.selectDeptTreeNodes();
    }
}
